Skip to content

Fix documentation errors in Android.Text and Android.Text.Format (R098, pass 3) - #1978

Merged
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-android-text-docs-r098-pass-3
Nov 28, 2026
Merged

jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-android-text-docs-r098-pass-3

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 2053ec2e05e94525d1c5ff21fb10e5e0b5ea6180

Dimension Assessment Rationale
Change confidence 9/10 ↑ Each fix cites a pinned source line that contradicts the old text.
↑ All 18 changed XML files parse; git diff --check is clean; no new placeholders.
↑ gemini-4-argon review reported no findings.
↓ Copilot and human reviews are pending.

Scope

Pass-3 review of AI-written documentation in Android.Text and Android.Text.Format (item R098, 90 files). I reviewed 2401 AI-changed channels, one ledger row each: 2166 correct, 24 fixed, 211 deferred boilerplate. Only high-confidence errors are fixed.

Fixes (24 channels, 18 files)

File Member / channel Error Evidence
BoringLayout string Make / ReplaceOrMake useFallbackLineSpacing (2) Text did not match the parameter behavior BoringLayout.java:130-131, 226-229, 444-455
BoringLayout string Make spacingmult / spacingadd (2) Said "multiplier of one / zero spacing"; the values are the caller's arguments BoringLayout.java:92-96; Layout.java:396-397
DateUtils GetRelativeDateTimeString flags (2) Said abbreviation is always used; it is used only with FORMAT_ABBREV_RELATIVE/FORMAT_ABBREV_ALL RelativeDateTimeFormatter.java:275-283, 292, 302-310
SpannableString, SpannedString Equals returns (2) Said identity comparison; implementation compares text and spans SpannableStringInternal.java:506-535
GraphemeClusterSegmentFinder, Highlights, SegmentFinder, SegmentFinder+PrescribedSegmentFinder, SpannableStringInternal, TextShaper, WordSegmentFinder activation ctor transfer (7) Said ownership of the reference transfers to the instance; the peer makes its own reference and transfer selects deletion of the incoming one (wording as in #1941) dotnet/android@9bc18c75 Object.cs:110-118, JNIEnv.cs:360-393
AlteredCharSequence GetChars remarks and off param (2) Remarks did not match the copy behavior; param named a nonexistent dst AlteredCharSequence.java:108-116
TextUtils+SimpleStringSplitter HasNext remarks Said next() throws when hasNext() is false; after a trailing delimiter next() returns "" TextUtils.java:559-571
TextUtils+SimpleStringSplitter Remove remarks Generic Iterator text; this method always throws UnsupportedOperationException TextUtils.java:573-575
LoginFilter+PasswordFilterGMail, +UsernameFilterGeneric, +UsernameFilterGMail IsAllowed remarks (3) "Subclasses must override this method" on concrete overrides LoginFilter.java:150-162, 181-193, 216-224
Formatter FormatShortFileSize returns Did not say a null context returns an empty string Formatter.java:119-122, 131-132
IGetChars GetChars destoff param Named a nonexistent dst GetChars.java:29-31

Pinned sources: AOSP android/text sources from the campaign source archive; dotnet/android@9bc18c75; dotnet/java-interop@87c5d3ea.

Uncertain findings and observations

  • Uncertain findings: 0.
  • Observation (not changed): the AlteredCharSequence.SubSequence string overload calls toString(), which calls getChars(0, len). That can throw when the selected range does not touch the substituted range (AlteredCharSequence.java:103-106, 114, 118-124). This is implementation behavior, not a doc error.

Checks

  • All changed XML files parse.
  • git diff --check is clean.
  • No new To be added text.
  • No changes to index.xml, _filter.xml or FrameworksIndex.
  • gemini-4-argon rubber-duck review: no findings.

…8, pass 3)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 28, 2026 12:19
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) November 28, 2026 12:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The pinned AOSP campaign archive is unavailable in the checkout, leaving the GetChars, span-equality, and relative-date-formatting claims pending human verification against that source.

No open issues 🎉

What changed in this PR

This documentation-only PR corrects 24 documentation entries across 18 files in Android.Text and Android.Text.Format, aligning the managed API reference with implementation behavior. It does not change runtime code or API signatures.

Changes:

  • Clarifies JNI reference handling in seven activation constructors, consistent with the wording introduced in #1941.
  • Corrects text equality, character copying, layout spacing, splitter behavior, and login-filter documentation.
  • Documents relative-date abbreviation flags and the empty-string result when formatting a file size with a null context.
File Description
docs/​xml/​Android.Text/​WordSegmentFinder.xml Clarifies JNI reference handling.
docs/​xml/​Android.Text/​TextUtils+SimpleStringSplitter.xml Corrects iteration and unsupported-removal remarks.
docs/​xml/​Android.Text/​TextShaper.xml Clarifies JNI reference handling.
docs/​xml/​Android.Text/​SpannedString.xml Describes text-and-span equality.
docs/​xml/​Android.Text/​SpannableStringInternal.xml Clarifies JNI reference handling.
docs/​xml/​Android.Text/​SpannableString.xml Describes text-and-span equality.
docs/​xml/​Android.Text/​SegmentFinder+PrescribedSegmentFinder.xml Clarifies JNI reference handling.
docs/​xml/​Android.Text/​SegmentFinder.xml Clarifies JNI reference handling.
docs/​xml/​Android.Text/​LoginFilter+UsernameFilterGMail.xml Removes an incorrect override requirement.
docs/​xml/​Android.Text/​LoginFilter+UsernameFilterGeneric.xml Removes an incorrect override requirement.
docs/​xml/​Android.Text/​LoginFilter+PasswordFilterGMail.xml Removes an incorrect override requirement.
docs/​xml/​Android.Text/​IGetChars.xml Corrects the destination parameter reference.
docs/​xml/​Android.Text/​Highlights.xml Clarifies JNI reference handling.
docs/​xml/​Android.Text/​GraphemeClusterSegmentFinder.xml Clarifies JNI reference handling.
docs/​xml/​Android.Text/​BoringLayout.xml Corrects fallback and legacy spacing parameter descriptions.
docs/​xml/​Android.Text/​AlteredCharSequence.xml Explains copying behavior and corrects the offset reference.
docs/​xml/​Android.Text.Format/​Formatter.xml Documents the null-context return value.
docs/​xml/​Android.Text.Format/​DateUtils.xml Clarifies abbreviation flags and date-formatting limits.

Review effort: Balanced

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto

Copy link
Copy Markdown
Member

In response to @jonathanpeppers's request: I have checked all 18 changed documentation files and their relevant Android source contracts. The target branch moved again from 90c2b57 to 7b42354 while the final publication snapshot was being captured (the guard returned: "Head, actual target or description changed during publication capture"). I still need to check that last target-only integration delta and repeat the final whole-PR pass against it. This is a reviewer coverage gap, not a defect in this PR; the completed source review is retained for the next scheduled tick.

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all 18 changed XML documentation files and the affected reference and platform behavior, including the character-copy behavior, span equality, relative-date flags, fallback line spacing, and JNI reference-ownership wording. No blocking correctness issues found. Static source review only; no builds or tests executed.

@jonathanpeppers
jonathanpeppers merged commit 9ee8753 into main Nov 28, 2026
4 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-review-android-text-docs-r098-pass-3 branch November 28, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants